package com.gb.demand.common.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gb.demand.common.dto.GoodsBO;
import com.gb.demand.common.entity.Accessory;
import com.gb.demand.common.entity.GongcaiyunArea;
import com.gb.demand.common.entity.Goods;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * 应用模块名称
 * <p>
 *
 * @author wengjiangle
 * @since 2020/7/13
 */
@Repository
public interface GoodsMapper extends BaseMapper<Goods> {
    List<Goods> findGoodsByCategoryId(@Param("appKey") String appKey,@Param("categoryId") String categoryId);

    Goods findGoodsBySku(@Param("appKey") String appKey,@Param("sku") String sku);

    Accessory findAccessoryByGoodsSku(@Param("sku") String sku);

    String findBrandNameBySku(@Param("sku") String sku);

    String findCategoryIdBySku(@Param("sku") String sku);

    List<Accessory> findProductImagesBySkus(@Param("sku") String sku);

    List<Goods> findAllGoodsBySkus(@Param("sku") List<String> sku);

    List<GoodsBO> getGoodsAll();
}
